#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>

void bubble_sort(int* arr, int so)
{
	int j = 0, k = 0;
	for (j = 0; j < so - 1; j++)
	{
		int flag = 0;
		for (k = 0; k < so - 1 - j; k++)
		{
			if (arr[k] > arr[k + 1])
			{
				flag = 1;
				int tmp = arr[k + 1];
				arr[k + 1] = arr[k];
				arr[k] = tmp;
			}
		}
		if (flag == 0)
		{
			break;
		}
	}


}

int main()
{
	int arr[10] = { 10,9,8,7,36,5,64,3,2,1 };
	int so = sizeof(arr) / sizeof(arr[0]);
	bubble_sort(arr, so);
	int i = 0;
	for (i = 0; i < so; i++)
	{
		printf("%d ", arr[i]);
	}




	return 0;
}